package com.ruoyi.security.domain.vo;

import com.ruoyi.security.domain.AfElevator;

//@Data
public class ElevatorStatusPushVo {

   // private AfElevator elevator;

    public void setElevator(AfElevator elevator) {
        if(elevator != null){
            if(elevator.getElevatorName().endsWith("货梯")){
                this.typeLocationNum = "货梯|" + elevator.getDwCode() +"|" + elevator.getElevatorCode();
            }else {
                this.typeLocationNum = "客梯|" + elevator.getDwCode() +"|" + elevator.getElevatorCode();
            }

        }

    }

    public void setElevatorStatus(ElevatorStatusVo elevatorStatus) {
        //故障状态
        this.status = elevatorStatus.getStatus();
        //故障码
        this.errorCode = elevatorStatus.getErrorCode();
        //时间
        this.date = elevatorStatus.getDate();
    }

    public String getTypeLocationNum() {
        return typeLocationNum;
    }

    public void setTypeLocationNum(String typeLocationNum) {
        this.typeLocationNum = typeLocationNum;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }
    //private ElevatorStatusVo elevatorStatus;

    private String typeLocationNum;

    //故障状态
    private String status;

    //故障码
    private String errorCode;

    //时间
    private String date;
}
